<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*alt shift f 格式代码*/

        .box1,
        .box2,
        .box3 {
            width: 150px;
            height: 150px;
            border: 10px solid #000;
            /*设置为负值 反向移动 可以让盒子交错在一起*/
             margin-top: -10px;
        }

        /*.box1 {
            margin-top: -10px;
        }

        .box2 {
            margin-top: -10px;
        }

        .box3 {
            margin-top: -10px;
        }*/
    </style>
</head>

<body>

    <div class="box1">1</div>
    <div class="box2">2</div>
    <div class="box3">3</div>

</body>

</html>